package org.sample.springboot.mocker;

import org.sample.springboot.model.Address;

import java.util.function.Consumer;

public class AddressMocker {

	private AddressMocker() {

	}

	public static interface AddressPropMocker extends Consumer<Address> {

	}

	public static Address mock(AddressPropMocker... propMockers) {
		Address obj = new Address();

		for (AddressMocker.AddressPropMocker propSetter : propMockers) {
			propSetter.accept(obj);
		}

		return obj;
	}

	public static AddressPropMocker street(String street) {
		return obj -> obj.setStreet(street);
	}

}
